1 //--------------------------------------------------------------------------
3 // Copyright (c) Microsoft Corporation. All rights reserved.
5 // File: NoFlickerPanel.cs
7 // Description: A double-buffering and redraw-on-resizing panel.
9 //--------------------------------------------------------------------------
12 using System
.Windows
.Forms
;
14 namespace Microsoft
.ParallelComputingPlatform
.ParallelExtensions
.Samples
.Sudoku
.Controls
16 /// <summary>A derived panel that uses double buffering to prevent flicker.</summary>
17 [ToolboxBitmap(typeof(Panel
))]
18 internal class NoFlickerPanel
: Panel
20 /// <summary>Initializes the panel.</summary>
21 public NoFlickerPanel()
24 ControlStyles
.DoubleBuffer
|
25 ControlStyles
.AllPaintingInWmPaint
|
26 ControlStyles
.UserPaint
|
27 ControlStyles
.ResizeRedraw
|
28 ControlStyles
.SupportsTransparentBackColor
, true);